import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";


type homeResult = {
  page: any;
  result: any
};

/** 新增厂商 */
export const addXfactoryController = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xfactoryController/insert"), { data });
};

/** 根据id删除厂商 */
export const deleteXfactoryController = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/xfactoryController/delete/${userid}`));
};


/** 修改厂商信息 */
export const updateXfactoryController = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xfactoryController/update"), { data });
};


/** 分页查询 */
export const getXfactoryController = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xfactoryController/selbypage"), { data });
};

















